package main

import (
	"srv/ticker/exchange"
	"global/libs/structs"
)

// 工厂方法
func NewTickerFactory(slug string, symbols []structs.Symbol) exchange.InterfaceTicker {

	switch slug {
	case "binance":
		return exchange.NewBinanceTicker(ctx.GetBaseRedis(), slug, symbols)
	case "huobi":
		return exchange.NewHuobiTicker(ctx.GetBaseRedis(), slug, symbols)
	case "bit-z":
		return exchange.NewBitZ(ctx.GetBaseRedis(), slug)

	}

	return nil
}
